# print('1到100以内的6的倍数的和: %d' % sum(filter(lambda x: x % 3 != 0, range(1, 96))))

sum = 0
i = 0
while sum <= 3000-i:
    if i % 3 == 0:
        i += 1
        continue
    sum += i
    i += 1
print(f"{i},{sum}")